﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<TBlog.Models.Post>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>เขียนโพส</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            
            <%: Html.HiddenFor(model => model.post_id) %>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_author) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_author) %>
                <%: Html.ValidationMessageFor(model => model.post_author) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_date) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_date) %>
                <%: Html.ValidationMessageFor(model => model.post_date) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_content) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_content) %>
                <%: Html.ValidationMessageFor(model => model.post_content) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_title) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_title) %>
                <%: Html.ValidationMessageFor(model => model.post_title) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_status) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_status) %>
                <%: Html.ValidationMessageFor(model => model.post_status) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_comment_status) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_comment_status) %>
                <%: Html.ValidationMessageFor(model => model.post_comment_status) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_modified) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_modified) %>
                <%: Html.ValidationMessageFor(model => model.post_modified) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.menu_order) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.menu_order) %>
                <%: Html.ValidationMessageFor(model => model.menu_order) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_type) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_type) %>
                <%: Html.ValidationMessageFor(model => model.post_type) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.post_category_id) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.post_category_id) %>
                <%: Html.ValidationMessageFor(model => model.post_category_id) %>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

